package changeEmployeeTransaction;

import addEmployeeTransaction.Employee;
import main.Transaction;
import database.PayrollDatabase;

public abstract class ChangeEmployeeTransaction extends Transaction {
	private int empId;

	public ChangeEmployeeTransaction(int empId, PayrollDatabase database) {
		super(database);
		this.empId = empId;

	}

	public void execute() {
		Employee e = database.getEmployee(empId);

		if (e != null)
			change(e);
	}

	protected abstract void change(Employee e);
}
